home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Help / locale / help / english / sys / protect.doc < prev    next >
Encoding:
Text File  |  2000-10-06  |  2.4 KB  |  95 lines

  1. PROTECT
  2.  
  3. Changes the protection bits of a file or directory.
  4.  
  5. Format
  6.  
  7. PROTECT [FILE] <file | pattern> [FLAGS][+ | -] [<flags>] [ADD | SUB] [ALL]
  8. [QUIET]
  9.  
  10. Template
  11.  
  12. FILE/A,FLAGS,ADD/S,SUB/S,ALL/S,QUIET/S
  13.  
  14. Location
  15.  
  16. C:
  17.  
  18. All files and directories have a series of protection bits (attributes)
  19. stored with them that control their properties. These bits can be altered to
  20. indicate the type of file and the operations permitted. PROTECT is used to
  21. set or clear the protection bits. For directories, only the d bit is
  22. significant.
  23.  
  24. The protection bits are represented by letters:
  25.  
  26. s
  27.  
  28. The file is a script.
  29.  
  30. p
  31.  
  32. The file is a pure command and can be made resident.
  33.  
  34. a
  35.  
  36. The file has been archived.
  37.  
  38. r
  39.  
  40. The file can be read.
  41.  
  42. w
  43.  
  44. The file can be written to (altered).
  45.  
  46. e
  47.  
  48. The file is executable (a program).
  49.  
  50. d
  51.  
  52. The file or directory can be deleted. (Files within a delete-protected
  53. directory can still be deleted.)
  54.  
  55. Use the LIST command to see the protection bits associated with a file. The
  56. protection field is displayed with set (on) bits shown by their letters and
  57. clear (off) bits shown by hyphens. For example, a file that is readable,
  58. writable, and deletable has ----rw-d in the protection field.
  59.  
  60. To specify the entire protection field at the same time, enter the letters of
  61. the bits you want set as the FLAGS argument without any other keywords. The
  62. named bits are set and all the others are cleared.
  63.  
  64. The symbols + and - (or the equivalent keywords ADD and SUB) are used to
  65. control specific bits without affecting the state of unspecified bits. Follow
  66. + or - with the letters of the bits to set or clear, respectively, and only
  67. those bits are changed. There is no space after the symbol or between the
  68. letters. The order of the letters does not matter. ADD and SUB work
  69. similarly, but there must be a space between the keyword and the letters. You
  70. cannot both set and clear bits in the same command.
  71.  
  72. The ALL options adds or removes the specified protection bits from all the
  73. files and subdirectories matching the pattern entered. The QUIET option
  74. suppresses the screen output.
  75.  
  76. Example 1:
  77.  
  78. 1> PROTECT DF0:Memo +rw
  79.  
  80. sets only the protection bits r (readable) and w (writable) of the file Memo
  81. on DF0:. No other protection bits are changed.
  82.  
  83. Example 2:
  84.  
  85. 1> PROTECT L:#? e SUB
  86.  
  87. clears the e (executable) protection bit from all the files in the L:
  88. directory.
  89.  
  90. Example 3:
  91.  
  92. 1> PROTECT Work:Paint rwed
  93.  
  94. The protection status of Paint becomes "----rwed".
  95.